package com.stream.consumer;

import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.handler.annotation.SendTo;

import java.util.Objects;

/**
 * @author:wesley
 */

@EnableBinding(value = ConsumeChannel.class)
public class ConsumeReceiverProcess {


    @StreamListener(ConsumeChannel.inputChannel)
    @SendTo(ConsumeChannel.outChannel)
    public String processReceive(Object obj){

        System.out.println("**********************");
        System.out.println("processReceive received:"+obj.toString());
        System.out.println("**********************");

        return "processReceive ok";
    }

}
